<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>18、表单属性指令-v-model-多行入框.html</title>
</head>
<body>

<div id="app">
    <textarea id="intro" v-model.lazy.trim.number="intro" style="height: 200px;width: 400px;resize:none;"></textarea>
    <h1>你输入的字符长度是：{{intro.length}}</h1>
    <button @click="loginbtn">登录</button>
</div>

<script src="js/vue.global.js"></script>
<script>
    var vm = Vue.createApp({
        created(){
        },
        data() {
            return {
                intro:"你好"
            }
        },
        methods:{
            loginbtn(){
                var intro = this.intro;
                alert("你获取的内容是:" + intro)
            }
        }

    }).mount("#app");
</script>

</body>
</html>